panda.each = function(array, callback) {
	var i = 0, l = array.length;
	while (i < l) { callback(array[i++]); }
};

panda.map = function(obj, callback) {
	var ret = [], k, r;
	for (k in obj) {
		r = callback(obj[k]);
		if (r !== undefined) { ret.push(r); } 
	}

	return ret;
};

panda.grep = function(obj, callback) {
	var ret = [], k, v, r;
	for (k in obj) {
		v = obj[k];
		if (callback(v)) { ret.push(v); } 
	}

	return ret;
};

panda.upper = function(s) {
	return s[0].toUpperCase() + s.substr(1);
};

panda.log = function (name) {		
	return org.slf4j.LoggerFactory.getLogger(name);
};
